import App from './App'
import Vue from 'vue'
import request from './api/request.js'
import api from './api/index.js'
import * as utils from './utils/index.js'
import * as dialog from './utils/dialog.js'
import * as regExp from './utils/regExp.js'
import mixin from './utils/mixin.js'
import './uni.promisify.adaptor'

// #ifdef H5
// import VConsole from 'vconsole'
// new VConsole()
import App_pc from './App_pc'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
// #endif
Vue.config.productionTip = false
App.mpType = 'app'
/**
 * 将 api 接口 挂载到 uni中
 */
uni.$api = api
uni.finally = utils.complete
uni.$util = {
	...regExp,
	...dialog,
	...utils,
}
Vue.mixin(mixin);
const system = uni.getSystemInfoSync()
if (system.model == 'PC') {
	Vue.use(ElementUI);
	new Vue({
		router,
		render: h => h(App_pc)
	}).$mount('#app')
} else {
	App.mpType = 'app'
	new Vue({
		...App
	}).$mount()
}